<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
	<title>管理员管理</title>
	<link rel="stylesheet" href="${ctx}/static/css/bootstrap-duallistbox.min.css" />
</head>

<body>

	<div class="main-content-inner">
		<!-- #section:basics/content.breadcrumbs -->
		<div class="breadcrumbs" id="breadcrumbs">
			<script type="text/javascript">
				try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
			</script>
	
			<ul class="breadcrumb">
				<li>
					<i class="ace-icon fa fa-home home-icon"></i>
					<a href="${ctx}/welcome">主页</a>
				</li>
				<li class="active">管理员管理</li>
			</ul><!-- /.breadcrumb -->
	
			<!-- /section:basics/content.searchbox -->
		</div>	
		<!-- /section:basics/content.breadcrumbs -->
		
		<div class="page-content">
			
			<c:if test="${not empty message}">
				<div id="message" class="alert alert-success"><button data-dismiss="alert" class="close">×</button>${message}</div>
			</c:if>	
			
			<div class="page-header">
				<h1>
					密码
					<small>
						<i class="ace-icon fa fa-angle-double-right"></i>
						修改
					</small>
				</h1>
			</div><!-- /.page-header -->			
			
			<div class="row">
				<div class="col-xs-12">
					<!-- PAGE CONTENT BEGINS -->
					<div class="row">
						<div class="col-xs-12">

							<form id="inputForm" action="${ctx}/profile/updatePassword" method="post" class="form-horizontal">
								<input type="hidden" name="id" value="${user.id}"/>
								
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right" for="school_address"> 密码: </label>
									<div class="col-sm-4">
										<input type="text" id="plainPassword" name="plainPassword" placeholder="密码" class="form-control required" />
									</div>
								</div>
								
								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right" for="school_address"> 确认密码: </label>
									<div class="col-sm-4">
										<input type="text" id="confirmPassword" name="confirmPassword" placeholder="确认密码" class="form-control required" equalTo="#plainPassword" />
									</div>
								</div>
								
								<div class="clearfix form-actions">
									<div class="col-md-offset-3 col-md-9">
										<button id="submit_btn" class="btn btn-info" type="submit">
											<i class="ace-icon fa fa-check bigger-110"></i>
											提交
										</button>

										&nbsp; &nbsp; &nbsp;
										<button id="cancel_btn" class="btn" type="reset" onclick="history.back()">
											<i class="ace-icon fa fa-undo bigger-110"></i>
											返回
										</button>
									</div>
								</div>
								
							</form>
							
						</div><!-- /.span -->
					</div><!-- /.row -->			
				</div>
			</div>
			
		</div><!-- /.page-content -->
	</div>



	<!-- inline scripts related to this page -->

	<script src="${ctx}/static/js/jquery.validate.min.js"></script>
	<script src="${ctx}/static/js/messages_bs_zh.js"></script>
	<script src="${ctx}/static/js/jquery.bootstrap-duallistbox.min.js"></script>

	<script>
		$(document).ready(function() {
			//聚焦第一个输入框
			$("#loginName").focus();
			//为inputForm注册validate函数
			$("#inputForm").validate({
				rules: {
					mobile: {
						rangelength:[11,11],
						digits:true,
						remote: "${ctx}/register/checkMobile?userId=${user.id}"
					}
				},
				messages: {
					mobile: {
						rangelength:"手机格式不正确",
						remote: "手机号已存在"
					}
				}
			});
		});
	
	</script>
</body>
</html>
